package cn.bugstack.domain.activity.service;

import cn.bugstack.domain.activity.model.valobj.ActivitySkuStockKeyVO;

/**
 * @Author: Zchy
 * @Description: 活动sku库存处理接口
 * @DateTime: 12/1/2024 2:30 PM
 **/
public interface IRaffleActivitySkuStockService {

    /*
     * 获取活动sku库存消耗队列
     *       
     * @author: Zchy
     * @date: 12/1/2024 7:43 PM  
     * @return: cn.bugstack.domain.activity.model.valobj.ActivitySkuStockKeyVO
    **/
    ActivitySkuStockKeyVO takeQueueValue() throws InterruptedException;

    /*
     * 延迟队列 + 任务趋势更新活动sku库存
     *       
     * @author: Zchy
     * @date: 12/1/2024 7:44 PM  
    **/
    void updateActivitySkuStock(Long sku);

    /*
     * 缓存库存以消耗完毕，清空数据库库存
     *       
     * @author: Zchy
     * @date: 12/1/2024 7:44 PM 
     * @param: sku 
    **/
    void clearActivitySkuStock(Long sku);

    /*
     * 清空队列
     *       
     * @author: Zchy
     * @date: 12/1/2024 7:44 PM
    **/
    void clearQueueValue();
}
